<?php
/**
 * (commands) 核算物流成本
 */
namespace App\Console\Commands\MonthlyReport;

use App\Logic\MonthlyReport\CheckLogisticsSupplement;
use Illuminate\Console\Command;
class PaymentLogisticsSupplement extends Command
{
    /**
     * The name and signature of the console command.
     * 补充
     * @var string
     */
    protected $signature = 'payment:logistics-supplement {date=null}';

    /**
     * The console command description.
     * 产品物流费核算
     * @var string
     */
    protected $description = 'check logistics to mp';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $date = $this->argument('date');
        $func = $this->choice('choice exe func-item: (in sequential order & dont repeat)',
            [
                '_exePacketDelivery',//旧版小包发货出仓
                '_exeCustomerPlacing',//新版小包发货出仓
            ]);
        CheckLogisticsSupplement::exe($func,$date);
        $this->info($func.' exe success!');
        die('finish');
    }
}
